package com.chushouya.manager.constants;

import com.general.framework.core.enums.IEnum;
import io.swagger.annotations.ApiModel;

import java.util.Objects;

/**
 * IM推送业务场景
 */
@ApiModel("业务场景")
public enum BizScene implements IEnum<String> {

    platform_notice("platform_notice", "平台通知"),
    platform_alter( "platform_alter", "平台公告"),
    merchant_offer_notice("merchant_offer_notice", "商户出价通知")
    ;

    private String value;

    private String name;

    BizScene(String value, String name) {
        this.value = value;
        this.name = name;
    }

    public static String getTitle(String bizScene) {
        for (BizScene thisEnum : BizScene.values()) {
            if (Objects.equals(thisEnum.value, bizScene)) {
                return thisEnum.name;
            }
        }
        return null;
    }

    @Override
    public String value() {
        return value;
    }

    @Override
    public String named() {
        return name;
    }
}
